{* Smarty *}

{include file="header.tpl"}
{literal}
<script language="javascript">
	function check(form) {
		login_tips.innerHTML = "";
	}
</script>
{/literal}

<div id="main">
	<div id="mainbar-full">
		{include file="sub-header.tpl"}
			
		<div>{$error_info}</div>
		<form action="/login" method="post" name="login_form">
			<fieldset>
				<p><div id="login_tips"><font color=#FF0000>{$tips}</font> </div></p>

				<p><label for="username">用户名</label></p>
				<p><input type="text" name="username" id="username" value="{$username}" onclick="check(login_form)"/></p>

				<p><label for="password">密码</label></p>
				<p><input type="password" name="password" id="password" value="" onclick="check(login_form)"/></p>

			{if $need_captcha}
				<p><label for="captcha">验证码</label>
					输入你在下图中看到的字符</p>
				<p>
					<img name="captcha_img" id="captcha_img" src="{$BASE_HOSTPATH}{$captcha_img}"/>
					<span><a href="JavaScript:updateauthword();">Refresh</a></span>
				</p>
				<p><input type="text" name="captcha" id="captcha" value="" onclick="check(login_form)"/></p>

				{literal}
					<script language="javascript" type="text/javascript">
						function updateauthword() {
							document.getElementById("captcha_img").src += "?nocache=" + new Date().getTime();
						}
					</script>
				{/literal}
			{/if}
				<p><input type="checkbox" name="autologin" id="autologin"/>记住我</p>

				<p><input type="submit" name="submit" value="Login"/></p>

			</fieldset>
		</form>
		<a href="#">忘记了密码</a>
		<a href="#">注册</a>
	</div>
</div>
{include file="footer.tpl"}
